<template>
  <smart-page>
    <template #search>
      <smart-search :query-array="STREAM_BILL" @on-handler="onSearch"/>
    </template>
    <a-table v-model:selectedKeys="selectedKeys"
             :table-layout-fixed="theme.layoutFixed"
             :row-selection="rowSelection"
             :columns="CASE_COLUMNS"
             :row-key="rowKey"
             :column-resizable="theme.resizable"
             :bordered="theme.bordered"
             :stripe="theme.stripe"
             :sticky-header="theme.sticky"
             :hoverable="theme.hoverAble"
             :pagination="pagination"
             :loading="theme.loading"
             :data="dataSource"
             @page-change="onPageChange"
             @page-size-change="onPageSizeChange">
    </a-table>
  </smart-page>
</template>
<script lang="ts" setup name="defense-doc-URGENT">
import {onMounted} from 'vue';

import {STREAM_BILL} from '../resource/search'
import {CASE_COLUMNS} from "../resource/colums";
import {TablePage} from "@/libs/core";
import {PopBasicHttp} from "../resource/http";
import {Acl} from "@/libs/acl";

const pageConfig = {title: '列表', rowKey: 'id', nameKey: 'title'}
const {getBillList } = PopBasicHttp
const tablePage = new TablePage(pageConfig).setFetchXhr(getBillList).setPermission(Acl.POP_DIS_BILL_PAGE_LIST);

const {theme, pagination, rowKey, dataSource, rowSelection, selectedKeys} = tablePage
const {onFetch, onPageChange, onPageSizeChange, onSearch} = tablePage
onMounted(() => onFetch())
</script>

